class Solution
{
public:
    vector<int> ans;
    vector<int> inorderTraversal(TreeNode* root)
    {
        if (root == NULL)
            return ans;

        if (root->left)
            inorderTraversal(root->left);

        ans.push_back(root->val);

        if (root->right)
            inorderTraversal(root->right);

        return ans;
    }
};